An electronic device, which is equipped with a display, such as a smartphone, a wearable device, or the like has been widely supplied as mobile communication technologies develop. The electronic device may execute various functions such as a photo or video capturing function, a music or video file play function, a game function, an Internet function, and the like through the display, as well as a call function.
When any one of the above-described functions is executed, the electronic device may turn off the display such that the remaining functions are not executed. For example, the electronic device may use a proximity sensor and a receiver to prevent any other function(s) from being executed due to a contact between a user's face and the display while being on the phone. If phone sound is output through the receiver, the proximity sensor may calculate a distance between the electronic device and an object.
The proximity sensor may output ultrasonic waves or light; if the ultrasonic waves or light reflected from the object is received, the proximity sensor may calculate the distance between the electronic device and the object based on a time period from a time when the ultrasonic waves or light is output to a time when the reflected ultrasonic waves or light is received. If the calculated distance is not less than a specific distance or more, the electronic device may turn on the display. If the calculated distance is less than the specific distance, the electronic device may turn off the display. If the ON/OFF of the display is controlled according to the calculated distance, it may be possible to prevent any other function from being executed while being on the phone.
However, a bezel of a specific width or more may be necessary to dispose the proximity sensor and the receiver on a front surface of the electronic device. If the width of bezel increases, the size of the display may decrease, thereby reducing the immersion of the user. Also, if the width of bezel increases, a front configuration of the electronic device may be restricted in design.
Accordingly, there is a need for an electronic device capable of calculating a distance between the electronic device and an object without using the proximity sensor. Also, there is a need for an electronic device capable of outputting sound without using the receiver.